﻿using Hangout.Web.Core.Meetup;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Hangout.Services.Core.Meetup
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "MeetupService" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select MeetupService.svc or MeetupService.svc.cs at the Solution Explorer and start debugging.
    public class MeetupService : IMeetupService
    {

        Web.Services.Meetup.Meetup wrapper = new Web.Services.Meetup.Meetup();

        public void InsertHangout(int userId, bool moderateHangoutRequest, string description, string text, Web.Model.Location screenshotLocation, Web.Model.Location location,DateTime hangoutdateTime,DateTime clientDateTime, string accesstoken)
        {
            wrapper.InsertHangout(userId, moderateHangoutRequest, description, text, screenshotLocation, location,  hangoutdateTime, clientDateTime, accesstoken);
        }

        public Web.Services.Objects.Meetup GetLastHangout(int userId)
        {
            return wrapper.GetLastHangout(userId);
        }


        public List<Web.Services.Objects.Meetup> GetUserLatestHangouts(int userId, int skip, int take)
        {
            return wrapper.GetUserLatestHangouts(userId, skip, take);
        }

        public Web.Services.Objects.MeetupData GetHangout(int hangoutId, string accesstoken)
        {
            return wrapper.GetHangout(hangoutId, accesstoken);
        }

        public List<Web.Services.Objects.User> GetUsersInHangout(int hangoutId, string accesstoken)
        {
            return wrapper.GetUsersInHangout(hangoutId, accesstoken);
        }

        public List<Web.Services.Objects.HangoutComment> GetHangoutComments(int hangoutId, string accesstoken)
        {
            return wrapper.GetHangoutComments(hangoutId, accesstoken);
        }

        public List<Web.Services.Objects.HangoutComment> GetHangoutCommentsAfter(int hangoutId, DateTime after, string accesstoken)
        {
            return wrapper.GetHangoutCommentsAfter(hangoutId, after, accesstoken);
        }


        public void AddHangoutComment(int userId, int hangoutId, string text, DateTime clientdatetime, string accesstoken)
        {
            wrapper.AddHangoutComment(userId,hangoutId, text, clientdatetime, accesstoken);

        }

        public bool IsPinned(int userId, int hangoutId, string accesstoken)
        {
            return wrapper.IsPinned(userId,hangoutId, accesstoken);

        }

        public List<Web.Services.Objects.Meetup> GetAllPinned(int userId, string accesstoken)
        {
            return wrapper.GetAllPinned(userId, accesstoken);
        }

        public void PinHangout(int userId, int hangoutId, string accesstoken)
        {
            wrapper.PinHangout(userId, hangoutId, accesstoken);
        }

        public void UnPinHangout(int userId, int hangoutId, string accesstoken)
        {
            wrapper.UnPinHangout(userId, hangoutId, accesstoken);

        }

        public bool JoinedInHangout(int userId, int hangoutId, string accesstoken)
        {
            return wrapper.JoinedInHangout(userId, hangoutId, accesstoken);
        }

        public Web.Core.Meetup.CheckInStatus CheckIn(int userId, int hangoutId, DateTime clientDateTime, double latitude, double longitude, string accesstoken)
        {
           return wrapper.CheckIn(userId,hangoutId,clientDateTime,latitude,longitude,accesstoken);
        }

        public void JoinHangout(int userId, int hangoutId, DateTime clientDateTime, string accesstoken)
        {
            wrapper.JoinHangout(userId, hangoutId, clientDateTime, accesstoken);
        }

        public void UnJoinHangout(int userId, int hangoutId, DateTime clientdatetime, string accesstoken)
        {
            wrapper.UnJoinHangout(userId, hangoutId, clientdatetime, accesstoken);
        }


        public bool IsCheckedIn(int userId, int hangoutId, string accesstoken)
        {
            return wrapper.IsCheckedIn(userId, hangoutId, accesstoken);
        }


        public bool CanCheckIn(int userId, int hangoutid, string accesstoken)
        {
            return wrapper.CanCheckIn(userId, hangoutid, accesstoken);
        }


        public List<Web.Services.Objects.Meetup> GetUserHangout(int userId, int take, int skip)
        {
            return wrapper.GetUserHangout(userId, take, skip);
        }

        public List<Web.Services.Objects.Meetup> GetLatestHangouts(int userid, int take, int skip, string accessToken)
        {
            return wrapper.GetLatestHangouts(userid, take, skip, accessToken);
        }

        public List<Web.Services.Objects.Meetup> SearchHangouts(int userid, string text, int take, int skip, string accessToken)
        {
            return wrapper.SearchHangouts(userid, text, take, skip, accessToken);
        }


        
    }
}
